package day05;

import java.util.*;
 
public class Main 
{ 
    public static void main(String[] args)
    { 
        String str = "runoob,google,taobao,facebook,zhihu";
        String [] words=str.split(",");
        System.out.println(Arrays.asList(words));
        // 以 , 号为分隔符来分隔字符串
        StringTokenizer st=new StringTokenizer(str,",");
        while(st.hasMoreTokens()) { 
            System.out.println(st.nextToken());
        }
    }
}